list = "jx集年货.jpg"
go = "jx去浏览.jpg"
award = "jx领奖励.jpg"

while true do
    wid= widget.find({["text"]="京喜发福利啦！"})
    if  wid  then
        x,y = image.findImageInRegion(list,817,1413,1045,1559,500000)
        if x~=-1 and x~=-1 then
            event.tap(x+70,y+20)
            mSleep(2000) 
            toast("【集年货】") 
        end
        x,y = image.findImageInRegion(go,776,1256,1025,2178,500000)
        if x~=-1 and x~=-1 then
            event.tap(x,y)
            mSleep(1000) 
            toast("【去浏览】") 
            mSleep(8*1000) 
            keycode.back()
            mSleep(3000) 
        end
        x,y = image.findImageInRegion(award,776,1256,1025,2178,500000)
        if x~=-1 and x~=-1 then
            event.tap(x,y)
            mSleep(1000) 
            toast("【领奖励】") 
            mSleep(2000) 
        end
    end
end